cmake_minimum_required(VERSION 3.4.1)


set(LIBEVENT_DIR libevent)

include_directories(jsoncpp/include)
add_subdirectory(jsoncpp)
# 添加 libevent 库头文件路径
include_directories(${LIBEVENT_DIR}/include)

# 添加 libevent 库链接路径
link_directories(${LIBEVENT_DIR}/lib/)

#add_library(event SHARED ${LIBEVENT_DIR}/lib/libevent-2.1.so)



add_library( # Sets the name of the library.
        webrtc

        # Sets the library as a shared library.
        SHARED
        webrtc.cpp
        peer_connect_client.cpp
        peer_connect_client.h
        default.h
        ${CMAKE_SOURCE_DIR}/libevent/lib/${ANDROID_ABI}/libevent-2.1.so
)

target_link_libraries(webrtc log ${CMAKE_SOURCE_DIR}/libevent/lib/${ANDROID_ABI}/libevent-2.1.so jsoncpp)